﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1._02_Common
{
    public class ShopManagerLevelTool
    {
        public static string GetShopManagerLevelName(int orderCount)
        {
            if (orderCount >= (1 + 30))
            {
                return "直营店铺";
            }
            else if (orderCount >= (1 + 20))
            {
                return "旗舰店铺";
            }
            else if (orderCount >= (1 + 10))
            {
                return "高级店铺";
            }
            else if (orderCount >= (1 + 5))
            {
                return "中级店铺";
            }
            else if (orderCount >= (1 + 1))
            {
                return "初级店铺";
            }
            else
            {
                return "--";
            }
        }

        public static decimal GetShopManagerLevelPercent(int orderCount)
        {
            if (orderCount >= (1 + 30))
            {
                return 0.01M;
            }
            else if (orderCount >= (1 + 20))
            {
                return 0.008M;
            }
            else if (orderCount >= (1 + 10))
            {
                return 0.007M;
            }
            else if (orderCount >= (1 + 5))
            {
                return 0.006M;
            }
            else if (orderCount >= (1 + 1))
            {
                return 0.005M;
            }
            else
            {
                return 0M;
            }
        }

    }
}
